//使用promise，3s之后打印值

console.log('here we go')

new Promise(resolve=>{
    setTimeout(function(){
        resolve('hello')
    },3000)
})
.then(function(value){
    console.log(value+'world')
}).then(function(ddd){
    console.log(ddd) //undefined
})

let newpromise = new Promise(resolve=>{
    setTimeout(function(){
        resolve('hello')
    },3000)
})

newpromise.then(function(value){
    console.log(value)
})

newpromise.then(function(rrr){
    console.log(rrr)
})